In a computing system, a virtual machine (VM) may provide hardware support for software that is incompatible with an underlying hardware system, or physical machine.
For example, a VM may emulate, or virtualize, a processor (CPU) such that an operating system or other software running on the VM interfaces with the VM as if the VM were the physical machine. To implement such virtualization, a control structure may be used to manage information related to the state or execution environment of the VM.
A typical CPU implementing virtualization operates in at least two modes, a non-root mode and a root mode. The CPU normally executes instructions in the non-root mode, but may switch to the root mode to execute a privileged instruction (e.g., a control register instruction, input/output instruction, an interrupt, an exception) or other instruction that the CPU cannot execute directly. Switching to the root mode is referred to as a VM exit, and switching back to the non-root mode is referred to as a VM entry.
Existing x86 virtualization technologies make it possible to run multiple VMs on a physical machine. Unfortunately, such virtualization technologies implement the multiple VMs side-by-side, or in parallel, on the physical machine, and are thus limited to providing a single layer of virtualization.
Systems and methods are needed to overcome the above-mentioned shortcomings.